package com.report.reportserver.model;

import java.util.*;

/**
 * @ ClassName: ColumnTitleMap
 * @ Description：数据导出，生成excel文件时的列名称
 * @ Modified By：
 * @ Version:
 * @ Author     ：LiYing
 * @ Date       ：Created in 13:09 2022/4/21
 */

public class ColumnTitleMap {

    private Map<String, String> columnTitleMap = new HashMap<String, String>();
    private ArrayList<String> titleKeyList = new ArrayList<String>();

    public ColumnTitleMap() {
        initUserInfoColu();
        initUserInfoTitleKeyList();
    }

    /**
     * mysql用户表需要导出字段--显示名称对应集合
     */
    private void initUserInfoColu() {
        columnTitleMap.put("uuid", "内容ID");
        columnTitleMap.put("contentType", "内容类型");
        columnTitleMap.put("title", "标题");
        columnTitleMap.put("publishedTime", "发布时间");
        columnTitleMap.put("uid", "作者ID");
        columnTitleMap.put("nickname", "昵称");
        columnTitleMap.put("readingNum", "阅读量");
        columnTitleMap.put("likes", "点赞量");
        columnTitleMap.put("src", "视频地址");
        columnTitleMap.put("link", "内容链接");
    }

    /**
     * mysql用户表需要导出字段集
     */
    private void initUserInfoTitleKeyList() {
        titleKeyList.add("uuid");
        titleKeyList.add("contentType");
        titleKeyList.add("title");
        titleKeyList.add("publishedTime");
        titleKeyList.add("uid");
        titleKeyList.add("nickname");
        titleKeyList.add("readingNum");
        titleKeyList.add("likes");
        titleKeyList.add("src");
        titleKeyList.add("link");
    }

    public Map<String, String> getColumnTitleMap() {
        return columnTitleMap;
    }

    public ArrayList<String> getTitleKeyList() {
        return titleKeyList;
    }
}
